<?php
namespace Blind\Model;
use Think\Model;

class UserModel extends Model
	{
		//获取手机号
		public function getPhone($phone)
		{
			return $this -> where('phone=%s', $phone) -> find();
		}

		public function UserSelect($id)
		{
			if(!empty($id)){
				return $this -> find($id);
			}else{
				return $this -> select();
			}
		}


		public function UserEdit($id, $arr)
		{
			return $this -> where('id=%d', $id) -> save($arr);
		}

		public function UserDelete($id)
		{
			return $this -> delete($id);
		}
	}
